package config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.PropertySource;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.multipart.support.StandardServletMultipartResolver;

import com.spittr.web.HomeController;
import com.springinaction.knights.BraveKnight;
import com.springinaction.knights.SlayDragonQuest;

@Configuration
@ComponentScan(basePackages={"com.springinaction"})
@ContextConfiguration(locations={"classpath:spring/spring-transaction.xml"})
@PropertySource("classpath:test.properties")
@EnableAspectJAutoProxy
public class ComponentScanConfig {
	
	@Bean
	public SlayDragonQuest setSlayDragonQuest(){
		return new SlayDragonQuest(System.out);
	}
	
	@Bean
	public BraveKnight sgtPeppers(){
		return new BraveKnight(setSlayDragonQuest());
	}
}
